import request from 'utils/request/request';
import Config from 'utils/api'
// import {REQUEST_TYPE} from 'utils/Enum'
import { createTheURL } from 'utils/utils';

export async function getSealList(params) {
  return request(createTheURL(Config.SEAL_LIST, 'general'), {
  // return request(createTheURL(Config.SEAL_LIST, 'admin'), {
    method: 'get',
    body:params,
  });
}

export async function postFormsAdd(params) {
  return request(createTheURL(Config.ENVELOPE +'/'+ params.envelopeWsid+'/participants/'+params.participantWsid,'forms/bulk'), {
    method: 'post',
    body:params.news
  });
}

export async function getFormsSearch(params) {
  return request(createTheURL(Config.ENVELOPE +'/'+ params.envelopeWsid+'/participants/'+params.participantWsid,'forms'), {
    method: 'get',
    body:params.query
  });
}

export async function putFormsUpdate(params) {
  return request(createTheURL(Config.ENVELOPE +'/'+ params.envelopeWsid+'/participants/'+params.participantWsid,'forms/bulk'), {
    method: 'put',
    body:params.updates
  });
}

export async function delFormsDelete(params) {
  return request(createTheURL(Config.ENVELOPE +'/'+ params.envelopeWsid+'/participants/'+params.participantWsid,'forms/bulk'), {
    method: 'delete',
    body:params.deletes,
  });
}
export async function getOperateInfo(params) {
  return request(createTheURL(Config.ENVELOPE +'/'+ params.envelopeWsid+'/participants/'+params.participantWsid,'need-handling'), {
    method: 'get',
    body:params.formsData
  });
}
export async function postSubmitConfirm(params) {
  return request(createTheURL(Config.ENVELOPE +'/'+ params.envelopeWsid+'/participants/'+params.participantWsid,'direct-pfx-on-time-confirm'), {
    method: 'post',
    body:params.formsWsidData,
  },'FORMS_CONFIRM_TYPE');
}
